package com.ymatou.iapi.trading.userquery.parameter.resp;

/**
 * 订单当前状态下的可操作信息. null表示不能进行操作
 * 
 */
public class OrderOperationInfo  {

    /**
     * 操作类型 OrderOperationTypeEnum
     */
    private int type;

    /**
     * 操作实际可用
     */
    private boolean active;

    /**
     * /// 校期
     */
    private String interval;

    /**
     * 距校期满还有多久
     */
    private String rest;

    /**
     * 要告知用户的信息 OrderOperationNoticeEnum
     */
    private long notice;

    /**
     * 需要理由
     */
    private boolean needReason;

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean getActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public String getInterval() {
        return interval;
    }

    public void setInterval(String interval) {
        this.interval = interval;
    }

    public String getRest() {
    	if (rest!=null && rest.contains(".")){
    		
    		return rest.split("\\.")[0];
    	}
        return rest;
    }

    public void setRest(String rest) {
        this.rest = rest;
    }

    public long getNotice() {
        return notice;
    }

    public void setNotice(long notice) {
        this.notice = notice;
    }

    public boolean getNeedReason() {
        return needReason;
    }

    public void setNeedReason(boolean needReason) {
        this.needReason = needReason;
    }
}
